import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    //用户头像默认值
    userPhoto:
      "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fabc.2008php.com%2F2011_Website_appreciate%2F11-03-06%2F20110306202142.jpg&refer=http%3A%2F%2Fabc.2008php.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1664420344&t=46c3d9353984599ae41d77d23d61f312",
    userName: "index", //默认值
  },
  mutations: {
    SET_USERPHOTO(state, value) {
      state.userPhoto = value;
    },
    SET_USERNAME(state, value) {
      state.userName = value;
    },
  },
  actions: {},
  modules: {},
});
